1) Field of the Invention
The present invention relates to an information processing apparatus and a software pre-fetch control method that can effectively pre-fetch commands if a translation look-aside buffer (TLB) formed from plural hierarchies exists.
2) Description of the Related Art
In recent years, performance of information processing apparatuses has been improving remarkably, and the number of commands that can be executed per unit time is increasing considerably, year after year. In contrast, the speed of accessing main storages are not improving that much, and there is the problem that a long processing wait time arises when the information processing apparatus fetches or stores data in the main storage.
To overcome this problem, a technique is widely being employed in which a cache memory, having smaller capacity but larger access speed than the main storage, is provided between the information processing apparatus and the main storage. In accessing the main storage, localization is recognized, and regions of the main storage that are accessed frequently are held in the cache memory. Consequently, the wait time during data access is minimum.
A pre-fetching technique also is used often to utilize the cache even more effectively. When data that does not exist in the cache is needed, that data must be transferred from the main storage to the cache. However, because accessing the main storage is slow, a processing wait occurs until the transfer is complete. Thus, pre-fetching is enabling the information processing apparatus to use data on the cache without generating a processing wait, by predicting in advance which data will be needed, and transferring the predicted data from the main storage to the cache in advance.
Japanese Patent Application Laid-open No. 2000-339157 Publication discloses a cache memory control apparatus and a computer system, which have plural types of pre-fetching commands, and which utilize these commands properly depending on the situation, to thereby carry out pre-fetching effectively while keeping the burden on the system to a minimum.
However, there are cases when pre-fetching cannot be executed effectively, even if the technique disclosed in Japanese Patent Application Laid-open No. 2000-339157 Publication is used. The problem lies in the conversion from a virtual address to a physical address.
Currently, virtual memories, which provide a virtual address space that is larger than the actual capacity of the main storage, are widely used in many systems. However, in such systems, the virtual address on the virtual address space must be converted to the physical address on the main storage when the main storage is accessed. The address conversion is also necessary at the time of executing software pre-fetching that is one type of pre-fetching.
When the virtual address is converted to the physical address, a conversion table, called a TLB, which is stored in a memory, must be referred to. Current TLBs are made to have many hierarchies in order to be higher-speed. When the hierarchy cannot be utilized efficiently, there are cases that the pre-fetching command breaks down and the software pre-fetching fails.